﻿using Model.BusinessModel.OutPut;
using Model.BusinessModel.OutPut.sys;
using Model.DomainModel.Sys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Utility;

namespace DomainService.IService.Sys
{
    /// <summary>
    /// 部门服务接口
    /// </summary>
    public interface ISysDepartmentService
    {
        /// <summary>
        ///  获取公司下的部门
        /// </summary>
        /// <returns></returns>
        List<TreeOutPut> GetCorporationDepartmentList(string corporationKey);

        /// <summary>
        /// 获取所有公司及部门--登录公司为星辰公司，可以获取全部，否则只获取登录公司数据
        /// </summary>
        /// <returns></returns>
        List<TreeOutPut> GetAllCorporationDepartmentList(string corporationKey);

        /// <summary>
        /// 新增部门
        /// </summary>
        /// <param name="sysDepartment">部门数据</param>
        ReceiveStatus Insert(SysDepartment sysDepartment);

        /// <summary>
        /// 修改部门
        /// </summary>
        /// <param name="sysCorporation">部门数据</param>
        ReceiveStatus Update(SysDepartment sysDepartment);

        /// <summary>
        /// 根据部门ID删除部门
        /// </summary>
        /// <param name="id">部门ID</param>
        /// <returns></returns>
        ReceiveStatus Delete(string id);

        /// <summary>
        /// 根据部门ID获取部门人员
        /// </summary>
        /// <param name="id">部门ID</param>
        /// <param name="corporationKey">公司key</param>
        /// <returns></returns>
        ReceiveStatus<SysDepartmentOutPut> GetDepartmentUserList(string? id, string? corporationKey);

        /// <summary>
        /// 根据公司获取数据
        /// </summary>
        /// <param name="corporationKey">公司key</param>
        /// <returns></returns>
        ReceiveStatus<SysDepartment> GetAllDepartment(string corporationKey);
    }
}
